<?php
namespace Users\Model;

class UserRegions
{
	public $region_id;
	public $user_id;
	public $country_id;
	public $add_region_date;
	public $last_region_date;
	public $countryname;
	public $regions_status;
	
	public function exchangeArray($data){
	
		$this->region_id  = (isset($data['region_id']))    ? $data['region_id']	: null;
		
		$this->user_id = (isset($data['user_id']))   ? $data['user_id']  : null;
		
		$this->country_id = (isset($data['country_id']))  ? $data['country_id']  : null;
		
		$this->add_region_date = (isset($data['add_region_date'])) ? $data['add_region_date']  					 : null;
		
		$this->last_region_date  	= (isset($data['last_region_date']))  	? $data['last_region_date']  : null;		
		$this->countryname  	= (isset($data['countryname']))  	? $data['countryname']  : null;		
		$this->regions_status  	= (isset($data['regions_status']))  	? $data['regions_status']  : null;		
	
	}

	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}